import { Get, Post } from "@/library/utils/request";

/**
 * 权限管理 - 角色列表 API请求路径
 */
export const RoleApiUrl = {
  SelectRoles: "Rbac/SelectRole",
  InsertRole: "Rbac/InsertRole",
  DeleteRole: "Rbac/DeleteRole",
  UpdateRole: "Rbac/UpdateRole",
  UpdateRoleMenuList: "Rbac/UpdateRoleMenuList",
}

export const RoleApi = {
  /** 获取角色列表数据 */
  SelectRoles: (param: any) => {
    return Get(RoleApiUrl.SelectRoles, param);
  },
  /** 新增角色 */
  InsertRole: (param: object) => {
    return Post(RoleApiUrl.InsertRole, param);
  },
  /** 删除角色 */
  DeleteRole: (param: object) => {
    return Post(RoleApiUrl.DeleteRole, param);
  },
  /** 编辑角色 */
  UpdateRole: (param: object) => {
    return Post(RoleApiUrl.UpdateRole, param);
  },
  /** 修改角色菜单权限 */
  UpdateRoleMenuList: (param: any) => {
    return Post(RoleApiUrl.UpdateRoleMenuList, param);
  }
}
